#!/usr/bin/env bash

MODULE=$1
BUILD_TAG=$2

PREFIX=registry.cn-shanghai.aliyuncs.com/guonl-hub/
IMAGE_NAME=${PREFIX}${MODULE}:${BUILD_TAG}
echo "镜像名称为："${IMAGE_NAME}

#docker 登录
docker login --username=guonl666 registry.cn-shanghai.aliyuncs.com -p 123QWEasd

docker build -t ${IMAGE_NAME} .
docker push ${IMAGE_NAME}
#docker rmi ${IMAGE_NAME}

echo "上传成功……"